//
//  UIImageView+LXImageView.m
//  LvXi_newVersion
//
//  Created by 王敏 on 16/9/10.
//  Copyright © 2016年 SJT. All rights reserved.
//

#import "UIImageView+LXImageView.h"

@implementation UIImageView (LXImageView)
-(void)lx_setImageWithUrl:(NSURL*)url placeholderImage:(UIImage*)placeholderImage{
    [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
    [self sd_setImageWithURL:url placeholderImage:placeholderImage completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
        [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO];
        if(!error){
            self.image = image;
        }
    }];
}
@end
